<template>
  <div>
    <h1>预告片</h1>
    <van-cell title="显示分享面板" @click="showShare = true" />
    <van-share-sheet
      v-model="showShare"
      title="立即分享给好友"
      :options="options"
      @select="onSelect"
    />
  </div>
</template>

<script>
import { ShareSheet, Cell } from "vant";
export default {
  data() {
    return {
      showShare: false,
      options: [
        { name: "微信", icon: "wechat" },
        { name: "微博", icon: "weibo" },
        { name: "复制链接", icon: "link" },
        { name: "分享海报", icon: "poster" },
        { name: "二维码", icon: "qrcode" },
      ],
    };
  },
  components: {
    [ShareSheet.name]: ShareSheet,
    [Cell.name]: Cell,
  },
  methods: {
     onSelect(option) {
      Toast(option.name);
      this.showShare = false;
    },
  },
};
</script>
<style lang="scss" scoped>
h1{
   margin-top: 200px;
}
</style>